package domain

import (
	"vrcm/src/vrcm/common/models"
)

type DistributionProtocol struct {
	models.Model

	TenantId     string `json:"tenant_id" gorm:"type:varchar(50);comment:租户"`
	DomainId     int    `json:"domain_id" gorm:"type:bigint unsigned;comment:域名配置id"`
	EnableHttps  int    `json:"enable_https" gorm:"type:tinyint;comment:1是 2否"`
	EnableQuic   int    `json:"enable_quic" gorm:"type:tinyint;comment:1是 2否"`
	EnableHttp2  int    `json:"enable_http2" gorm:"type:tinyint;comment:是否启用http2  1 启用  0禁用"`
	ForceJump    int    `json:"force_jump" gorm:"type:tinyint;comment:1 https 2http"`
	RedirectCode int    `json:"redirect_code" gorm:"type:int;comment:跳转码 301 302 307"`
	TlsVersion   string `json:"tls_version" gorm:"type:varchar(200);comment:跳转码 Tls1.0 Tls2.0 Tls3.0"`
	models.ModelTime
	models.ControlBy
}

func (DistributionProtocol) TableName() string {
	return "distribution_protocol"
}

func (e *DistributionProtocol) Generate() models.ActiveRecord {
	o := *e
	return &o
}

func (e *DistributionProtocol) GetId() interface{} {
	return e.Id
}
